package com.yn.common.request.sc;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

import java.io.Serializable;

/**
 * 转运服务文章管理表
 * 文章管理 Request
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "ArticleTransitRequest对象", description = "转运服务文章管理表")
public class ArticleTransitRequest implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "文章id")
    private Long id;

    @ApiModelProperty(value = "栏目id", required = true)
    @NotNull(message = "栏目类型不能为空")
    private Long titleManageId;

    @ApiModelProperty(value = "文章标题", required = true)
    @NotBlank(message = "请填写文章标题")
    @Length(max = 100, message = "文章标题最多100个字符")
    private String articleTitle;

    @ApiModelProperty(value = "文章来源", required = true)
    @Length(max = 100, message = "文章来源最多50个字符")
    private String articleSource;

    @ApiModelProperty(value = "文章内容", required = true)
    @NotBlank(message = "请填写文章内容")
    private String articleContent;
}
